var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/fuyang');

mongoose.connection.on('error', ()=>{
    console.error('connection error')
});
mongoose.connection.once('open', function() {
    console.log( 'connected success!' )
});

module.exports = mongoose;